package com.cykj.controller;

import com.cykj.dto.ResponseDto;
import com.cykj.service.ConsultantService;
import com.cykj.vo.BookingVo;
import com.cykj.vo.SelectMoneyVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @BelongsProject: Psychology
 * @BelongsPackage: com.cykj.controller
 * @Author: 小林
 * @CreateTime: 2025-02-04 11:12
 * @Description: 咨询师控制层
 * @Version: 1.0
 */
@RestController
@RequestMapping("/consultant")
public class ConsultantController {
    @Autowired
    private ConsultantService consultantService;

    @RequestMapping("/selectMoney")
   public ResponseDto selectMoney(@RequestBody SelectMoneyVo vo){
        return consultantService.selctMoney(vo);
    }

    /**
     * 后台预约列表显示（预约记录表、用户表、领域表、管理员表、咨询师表）
     * @param vo
     * @return
     */
    @RequestMapping("/getConsultantAndUserAndType")
    public ResponseDto getConsultantAndUserAndType(@RequestBody BookingVo vo){
        return consultantService.getConsultantAndUserAndType(vo);
    }

    /**
     * 修改预约记录内容
     * @param vo
     * @return
     */
    @RequestMapping("/updateAppointmentReply")
    public ResponseDto updateAppointmentReply(@RequestBody BookingVo vo){
        return consultantService.updateAppointmentReply(vo);
    }

    /**
     * 修改状态
     * @param vo
     * @return
     */
    @RequestMapping("/updateAppointmentStatus2")
    public ResponseDto updateAppointmentStatus2(@RequestBody BookingVo vo){
        return consultantService.updateAppointmentStatus2(vo);
    }
    /**
     * 修改状态
     * @param vo
     * @return
     */
    @RequestMapping("/updateAppointmentStatus3")
    public ResponseDto updateAppointmentStatus3(@RequestBody BookingVo vo){
        return consultantService.updateAppointmentStatus3(vo);
    }
    /**
     * 修改状态
     * @param vo
     * @return
     */
    @RequestMapping("/updateAppointmentStatus4")
    public ResponseDto updateAppointmentStatus4(@RequestBody BookingVo vo){
        return consultantService.updateAppointmentStatus4(vo);
    }
    /**
     * 修改状态
     * @param vo
     * @return
     */
    @RequestMapping("/updateAppointmentStatus5")
    public ResponseDto updateAppointmentStatus5(@RequestBody BookingVo vo){
        return consultantService.updateAppointmentStatus5(vo);
    }
    /**
     * 修改状态
     * @param vo
     * @return
     */
    @RequestMapping("/updateAppointmentStatus6")
    public ResponseDto updateAppointmentStatus6(@RequestBody BookingVo vo){
        return consultantService.updateAppointmentStatus6(vo);
    }

    /**
     * 后台统计图咨询师预约记录
     * @param vo
     * @return
     */
    @RequestMapping("/appointments")
    public ResponseDto getConsultantsWithAppointments(@RequestBody BookingVo vo) {
        // 调用 Service 方法
        return consultantService.getConsultantsWithAppointmentsByTimeRange(vo);
    }

    /**
     * 获取咨询师金额
     * @param adminId
     * @return
     */
    @RequestMapping("/getMoney")
    public ResponseDto getMoney(@RequestParam("adminId") Integer adminId) {
        // 调用 Service 方法
        System.err.println(adminId);
        return consultantService.getMoney(adminId);
    }
}

